<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/translator.tld" prefix="trans" %><head>
<trans:initPage module="browsesec" />

<link rel="stylesheet" href="<html:rewrite page="/alf.css" />" type="text/css">

<html:html>
<head>
      <script language="javascript">
            function make_layer_visible(layer) {
                  layer = document.getElementById(layer);
                  if (!layer) return;

                  if (layer.style) {
                        layer.style['visibility'] = 'visible';
                  } else {
                        layer.visibility = 'visible';
                  }
            }
      </script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
      
<div id="loading" style="position: relative;visibility: hidden;height:50px;width:50%;left: 25%;top:5%;text-align: center;vertical-align: middle;border: 1px dotted;background-color: #f2f2f2;" class="text_searchbold"> 
  <br>
  Loading...<br>
  Please wait<br>
</div>

      <html:form action="/sectors/browser">
      <html:hidden property="field_changed" value="" />
      <table width="90%" border="0" cellspacing="1" cellpadding="5" align="center" bgcolor="#3399CC" class="text_searchbold">
            <tr bgcolor="#3399CC">
                  <td class="textalb">
                  <trans:showPageMessage label="browsesec.sectorbrowser" />
                  </td>
            </tr>

            <tr bgcolor="#FFFFFF"><td>
            <table width="100%" border="0" class="text">
                  <tr>
                  <td align="left" colspan="3">
                  <br>
                  </td>
                  </tr>

                  <!-- sectors -->
                  <tr>
                  <td width="10%" align="right">
                  <logic:present name="marked_field">
                        <logic:equal value="sector" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </logic:present>
                  </td>
                  <td align="right" width="15%">
                  <trans:showPageMessage label="browsesec.sector" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="sector_id"
                        onchange="javascript:this.form.field_changed.value='sector';make_layer_visible('loading');this.form.submit();" >
                        <html:option value="-1"><trans:showPageMessage label="browsesec.nosector" /></html:option>
                        <logic:present name="sectors" scope="request">
                              <html:options collection="sectors"
                                    property="ro_aida_code"
                                    labelProperty="title" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>

                  <!-- sectors level 1-->
                  <tr>
                  <td width="10%" align="right">
                  <logic:present name="marked_field">
                        <logic:equal value="subsector" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </logic:present>
                  </td>
                  <td align="right" width="15%">
                  <trans:showPageMessage label="browsesec.subsectors" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="subsector_id"
                        onchange="javascript:this.form.field_changed.value='subsector';make_layer_visible('loading');this.form.submit();" >
                        <html:option value="-1"><trans:showPageMessage label="browsesec.nosubsector" /></html:option>
                        <logic:present name="subsectors">
                              <html:options collection="subsectors"
                                    property="ro_aida_code"
                                    labelProperty="title" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>

                  <!-- sectors level 2-->
                  <tr>
                  <td width="10%" align="right">
                  <logic:present name="marked_field">
                        <logic:equal value="subsector1" name="marked_field" scope="request"><img src=../images/arrow_blue.gif hspace=4></logic:equal>
                  </logic:present>
                  </td>
                  <td align="right" width="15%">
                  <trans:showPageMessage label="browsesec.subsectors1" />:
                  </td>
                  <td align="left" width="75%">
                  <html:select property="subsector1_id">
                        <html:option value="-1"><trans:showPageMessage label="browsesec.nosubsector" /></html:option>
                        <logic:present name="subsectors1">
                              <html:options collection="subsectors1"
                                    property="ro_aida_code"
                                    labelProperty="title" />
                        </logic:present>
                  </html:select>
                  </td>
                  </tr>
            </table>
            </td></tr>

            <tr bgcolor="#FFFFFF">
            <td align="left" class="text">
            <br>
           <img src=../images/arrow_blue.gif hspace=10>&nbsp;&nbsp; <trans:showPageMessage label="browsesec.cannotfindsector" />&nbsp;&nbsp;&nbsp;
            <html:link style="text-decoration=underline;font-weight:bold;" action="/sectors/finder.do" ><trans:showPageMessage label="browsesec.searchforasector" /></html:link>
            <br>
            <br>
            </td>
            </tr>

            <!-- submitari -->
            <tr bgcolor="#f9f9f9">
                  <td align="center">
                  <input type="hidden" name="action" value="" />
                  <input type="button"
                        class="butonsave"
                        onclick="this.form.action.value='save';this.form.submit();"
                        value="<trans:showPageMessage label="browseloc.saveselected" hide_link="true"/>" />
                  <input type="button"
                        class="butonsave"
                        onclick="javascript:window.close();"
                        value="<trans:showPageMessage label="browseloc.cancel" hide_link="true"/>" />&nbsp;&nbsp;<trans:showPageMessage label="browseloc.saveselected1"/>
                  </td>
            </tr>
      </table>

      </html:form>
</html:html>